home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7520 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.6 KB

  1. Path: telepost.no!usenet
  2. From: Carsten Arnholm <ca@sesam.dnv.no>
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: DLL's with classes in them
  5. Date: 23 Feb 1996 18:03:31 GMT
  6. Organization: DNV
  7. Message-ID: <4gkvhk$b1v@nms.telepost.no>
  8. References: <312C9B55.71F3@dial.pipex.com>
  9. NNTP-Posting-Host: hugin.sesam.dnv.no
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 1.1 (Windows; I; 32bit)
  14.  
  15. J P Crocker <whl.adv.eng@dial.pipex.com> wrote:
  16. >Here's one...
  17. >
  18. >I'm using Borland Turbo C++ 3.1, and am trying to create a DLL with a class 
  19. >definition which I can import into my App.  I've decared the class in the DLL 
  20. >using the EXPORT macro:
  21. >
  22. >   class EXPORT class_name
  23. >   {
  24. >    ...
  25. >   }
  26. >
  27. >and I've included the .lib file for the DLL in my project file. I now need to 
  28. >put some reference to class_name in my main application code so I can derive 
  29. >descendant classes from class_name.  How do I do this? Also, in the previous 
  30. >version I defined class_name in a header file, and included a prototype of 
  31. >the class at the top of the code ..
  32. >
  33. >  class class_name;
  34. >
  35. >so that I could create pointers to class_name before it was defined.  What is 
  36. >the appropriate syntax for doing this when class_name is contained in a DLL?
  37. >
  38. >Thanks
  39. >
  40. >Jason Crocker                       
  41. >    email: whl.adv.eng@dial.pipex.com
  42.  
  43.  
  44. Unfortunately, I do not believe this is possible. DLL's support only C-style
  45. API functions. You can have objects inside & outside the DLL, but you cannot
  46. import or export such objects.
  47.  
  48. If someone can prove me wrong, I would be most grateful.
  49.  
  50. Is OLE the answer ? 
  51.  
  52. Please reply to email: ca@sesam.dnv.no
  53.  
  54.